package com.itheima;

public class TestSwimming {
    public static void main(String[] args) {
       goSwimming(new Swimming() {
           @Override
           public void swim() {
               System.out.println("我要去游泳");
           }
       });

    }
    public static void goSwimming(Swimming swimming){
        swimming.swim();
    }
}


interface Swimming{
    void swim();
}